package negocio;

import beans.GeneralTo;
import dao.GeneralDAO;
import utildb.Transaction;
import utildb.TransactionException;

public class GeneralManager {

    	public GeneralManager() {
		super();
	}	

	public GeneralTo getGeneral() throws GeneralManagerException {
		Transaction t = new Transaction();
                GeneralTo oGeral = new GeneralTo();
		try {
			GeneralDAO fact = new GeneralDAO(t);
			oGeral = fact.buscarGeneral();
			t.commit();
		} catch (TransactionException e) {
			t.rollback();
		} finally {
			t.close();
		}
                return oGeral;
	}
}
